function getSlideName(to, from) {
  let indexTo = getIndexOfPath.call(this, to.name)
  let indexFrom = getIndexOfPath.call(this, from.name)
  return indexTo < indexFrom ? 'silde-left' : 'silde-right'
}

function getIndexOfPath(routeName) {
  let r = this.$router.options.routes
  for(let i = 0; i < r.length; i++) {
    if(r[i].name === routeName ) {
        return i
    }
  }
  return 999
}

export {getSlideName} 
export default getSlideName